<template>
  <div class="searchbox">
    <el-input placeholder="请输入内容" v-model="keyword" class="input-with-select">
      <el-select v-model="select" slot="prepend" placeholder="请选择">
        <el-option label="课程" value="1"></el-option>
        <el-option label="专家" value="2"></el-option>
      </el-select>
      <el-button slot="append" class="btn" @click="search()">搜索</el-button>
    </el-input>
  </div>
</template>

<script>
export default {
  data () {
    return {
      select: '1',
      keyword: ''
    }
  },
  methods: {
    search () {
      this.$router.push({
        name: 'searchshow'
      })
    }
  }
}
</script>
<style lang="scss" scoped>
  .searchbox{
    text-align: center;
    width: 600px;
    margin: 30px auto;
    /deep/ .el-input-group__prepend{width: 80px;background-color: inherit;}
    .btn{background-color: #26840C;color: #fff;}
  }
</style>
